
<?php Yii::app()->clientScript->registerScript('Markupcodes',<<<HERE
        Ext.onReady(function(){
        var store=Ext.create('Ext.data.Store',{
            model:'Markupcodes',
            pageSize:20,
            autoLoad:true,
            proxy:{
                type:'ajax',
                url:'index.php?r=markupcodes/list',
                reader:{
                    type:'json',
                    root:'data',
                    totalProperty:'totalCount'
                }
            }
        })
        Ext.create('Ext.ux.LiveSearchGridPanel',{
            store:store,
            height: 450,
            width: grid_width,
            title: 'Markupcodes List',
            renderTo: 'markupcodes-list',
            viewConfig: {
                stripeRows: true
            },
           
            bbar: new Ext.PagingToolbar({
                pageSize: 20,
                store:store,
                displayInfo: true,
                displayMsg: 'Displaying topics {0} - {1} of {2}',
                emptyMsg: 'No topics to display'

            }),
            columns:[        
                {                
                    text:'Markup',
                    flex:1,
                    dataIndex:'markup',
                    renderer :  function (value, p, record){
                          return Ext.String.format('<a href="index.php?r=markupcodes/update&id={0}">{1}</a>',record.data.id,record.data.markup);                                        
                        }      
                },
                {                
                    text:'Price',
                    flex:1,
                    dataIndex:'price'                   
                },
                {                
                    text:'range',
                    flex:1,
                    dataIndex:'range'                   
                },
                {                
                    text:'Morethan',
                    flex:1,
                    dataIndex:'morethan'                   
                },   
                 {                
                    text:'Lessthan',
                    flex:1,
                    dataIndex:'lessthan'                       
                },
                {                
                    text:'Cost',
                    flex:1,
                    dataIndex:'cost'      
                    
                },
                {
                    text:'Actions',
                    flex:1,
                    renderer:function(value,p,record){
                        return Ext.String.format('<a href="index.php?r=markupcodes/update&id={0}"><img src="images/update.png"/></a><a href="index.php?r=markupcodes/delete&id={0}"><img src="images/delete.png"/></a>',record.data.id);
                    }
                }
            ]

        });
    });
HERE
        ,CClientScript::POS_BEGIN);?>


<div id="left-col">
    <?php $this->renderPartial('_side',array(
//        'terms'=>$employee
    ));?>
</div>

<div id="right-col">

    <div class="wrap">
        <div class="container">

            
            <div id="breadcrumb" style="display:none;"><span style="padding-left:10px;font-size:10px;color:#777777;" id="alsoviewing"></span></div>
            <div class="inside">
             
                 <br/>
                 
             
                <div id="markupcodes-list"></div>


                
            </div><!-- inside -->
        </div><!-- container -->
    </div><!-- wrap -->
    <?php $this->renderPartial('/copyright'); ?>
</div> <!-- left-col -->